#ifndef DIALOG_H
#define DIALOG_H
#include"addsuccess.h"
#include <QDialog>
#include<Socket/TCPSocket.h>
#include"friendlist.h"
namespace Ui {
class Dialog;
}

class Dialog : public QDialog
{
    Q_OBJECT

public:
    static Dialog* getinstance(){

        if(myDialog==nullptr)
            myDialog=new Dialog();
        return myDialog;


    }
    explicit Dialog(QWidget *parent = nullptr);
    ~Dialog();
        void GetTCPSocket(TCPSocket *socket);
        void Getfriendlist(friendlist *friendlist);

private slots:
    void on_pushButton_clicked();
signals:
    void addfriend(QString friendid);
private:
    Ui::Dialog *ui;
       TCPSocket *mysocket;
       friendlist *myfriendlist;
    static   Dialog *myDialog;
};

#endif // DIALOG_H
